﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Veracruz.Facebook.Data
{
    internal static class UserTable
    {
        #region consts

        //SELECT name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 =763454623) ORDER BY name LIMIT 4 OFFSET 0
        internal const string GetNumberOfUsersOnline = "SELECT uid, online_presence FROM user WHERE (online_presence = 'active' OR online_presence='idle') AND uid IN (SELECT uid FROM app.users WHERE application_id={0})";

        #endregion       
        #region queries

        internal static class Queries
        {
            internal static string GetNumberOfUsersOnline()
            {
                return string.Format(UserTable.GetNumberOfUsersOnline, Constants.ApplicationId);
            }
        }

        #endregion
    }
}
